package top.caoayu.finance.tiancai;

import com.fasterxml.jackson.core.type.TypeReference;
import org.springframework.stereotype.Component;
import top.caoayu.finance.tiancai.VO.ResponseCardVO;
import top.caoayu.finance.tiancai.VO.ResponseDataVO;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Author: caoxinyu
 * @Date: 2023/9/11-11:29
 */
@Component("tiancaiClientServiceImpl")
public class FinanceClientServiceImpl {

    public static final String GET_FZRXMXX = "GetFzrxmxx";

    @Resource(name="tiancai/Client")
    private FinanceClient financeClient;

    public void getFundsCard(String userId) {
//        System.out.println("天财");
        Map<Object,Object> map = new HashMap<>();
        map.put("ygbh",userId);
        ResponseDataVO<List<ResponseCardVO>> financeData = this.financeClient.getFinanceData(GET_FZRXMXX, map, new TypeReference<List<ResponseCardVO>>() {});
        System.out.println();
        System.out.println();
        System.out.println();
        System.out.println();
        System.out.println(financeData);

    }

}
